package com.lkx.farmershop.controller;

import com.lkx.farmershop.common.api.ApiResult;
import com.lkx.farmershop.model.vo.UserHomeVo;
import com.lkx.farmershop.service.TuanService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/userHome")
public class UserHomeController {

    @Autowired
    private TuanService tuanService;

    @GetMapping("/getUserHome")
    public ApiResult<UserHomeVo> getUserHome(@RequestParam("theUserId") Long theUserId, @RequestParam("userId") Long userId){
        return tuanService.getUserHome(theUserId,userId);
    }


}
